package com.leadzone.dms.ctrl.base;

import javax.servlet.http.HttpServletRequest;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.leadzone.dms.mapper.GDeviceDao;

@Controller
@RequestMapping("/global")
public class GlobalControll {
	Logger log = Logger.getLogger(this.getClass());
//	@Autowired
//	private MyWxCpService myWxCpService;
	
   @Autowired
	private GDeviceDao equipdao;
	
	@RequestMapping(value = "/")
	public ModelAndView index(){
		return new ModelAndView("index"); 
	}
	@RequestMapping(value = "error")
	public ModelAndView error(){
		return new ModelAndView("error"); 
	}
	public String getFullUrl(HttpServletRequest request){
		return   "http://" + request.getServerName() //服务器地址  
     
        + request.getContextPath()      //项目名称  
        + request.getServletPath();      //请求页面或其他地址  
	}
 
	
	
	
	@RequestMapping(value = "/sourcelist/{type}/{puid}")
	public ModelAndView imglist(@PathVariable String type,@PathVariable String puid){
		ModelAndView modelAndView = new ModelAndView("mobile/imglist");
		
		modelAndView.addObject("type",type);
		modelAndView.addObject("puid",puid);
		
		
		return modelAndView;  
	}
 
 
}
